﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;

namespace TUM.Mustertexte_Parser
{
    public class AdditionalProductTopic : TemplateTopic
    {
        /// <summary>
        /// Gets a boolean value indicating whether this is a default additional topic.
        /// </summary>
        public bool Default
        {
            get
            {
                if (!_Default.HasValue)
                {
                    XmlNode defaultNode = TopicNode.SelectSingleNode("Standardauswahl");
                    _Default = defaultNode != null ? defaultNode.InnerText.Equals("ja", StringComparison.OrdinalIgnoreCase) : false;
                }
                return _Default.Value;
            }
        }
        bool? _Default;


        internal AdditionalProductTopic(string templateFilePath, XmlNode topicNode)
            : base(templateFilePath, topicNode)
        {
        }
    }
}
